home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / Adjustable.java < prev    next >
Text File  |  1998-09-22  |  3KB  |  130 lines

  1. /*
  2.  * @(#)Adjustable.java    1.6 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.awt;
  16.  
  17. import java.awt.event.*;
  18.  
  19. /**
  20.  * The interface for objects which have an adjustable numeric value
  21.  * contained within a bounded range of values.
  22.  *
  23.  * @version 1.6 07/01/98
  24.  * @author Amy Fowler
  25.  * @author Tim Prinzing
  26.  */
  27.  
  28. public interface Adjustable {
  29.  
  30.     /**
  31.      * The horizontal orientation.  
  32.      */
  33.     public static final int HORIZONTAL = 0; 
  34.  
  35.     /**
  36.      * The vertical orientation.  
  37.      */
  38.     public static final int VERTICAL = 1;    
  39.  
  40.     /**
  41.      * Gets the orientation of the adjustable object.
  42.      */
  43.     int getOrientation();
  44.  
  45.     /**
  46.      * Sets the minimum value of the adjustable object.
  47.      * @param min the minimum value
  48.      */
  49.     void setMinimum(int min);
  50.  
  51.     /**
  52.      * Gets the minimum value of the adjustable object.
  53.      */
  54.     int getMinimum();
  55.  
  56.     /**
  57.      * Sets the maximum value of the adjustable object.
  58.      * @param max the maximum value
  59.      */
  60.     void setMaximum(int max);
  61.  
  62.     /**
  63.      * Gets the maximum value of the adjustable object.
  64.      */
  65.     int getMaximum();
  66.  
  67.     /**
  68.      * Sets the unit value increment for the adjustable object.
  69.      * @param u the unit increment
  70.      */
  71.     void setUnitIncrement(int u);
  72.  
  73.     /**
  74.      * Gets the unit value increment for the adjustable object.
  75.      */
  76.     int getUnitIncrement();
  77.  
  78.     /**
  79.      * Sets the block value increment for the adjustable object.
  80.      * @param b the block increment
  81.      */
  82.     void setBlockIncrement(int b);
  83.  
  84.     /**
  85.      * Gets the block value increment for the adjustable object.
  86.      */
  87.     int getBlockIncrement();
  88.  
  89.     /**
  90.      * Sets the length of the proportionl indicator of the
  91.      * adjustable object.
  92.      * @param v the length of the indicator
  93.      */
  94.     void setVisibleAmount(int v);
  95.  
  96.     /**
  97.      * Gets the length of the propertional indicator.
  98.      */
  99.     int getVisibleAmount();
  100.  
  101.     /**
  102.      * Sets the current value of the adjustable object. This
  103.      * value must be within the range defined by the minimum and
  104.      * maximum values for this object.
  105.      * @param v the current value 
  106.      */
  107.     void setValue(int v);
  108.  
  109.     /**
  110.      * Gets the current value of the adjustable object.
  111.      */
  112.     int getValue();
  113.  
  114.     /**
  115.      * Add a listener to recieve adjustment events when the value of
  116.      * the adjustable object changes.
  117.      * @param l the listener to recieve events
  118.      * @see AdjustmentEvent
  119.      */    
  120.     void addAdjustmentListener(AdjustmentListener l);
  121.  
  122.     /**
  123.      * Removes an adjustment listener.
  124.      * @param l the listener being removed
  125.      * @see AdjustmentEvent
  126.      */ 
  127.     void removeAdjustmentListener(AdjustmentListener l);
  128.  
  129. }    
  130.